<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">

<head th:fragment="header">
	<meta charset="utf-8" />

	<!-- STYLE -->
	<link rel="stylesheet" href="../../../resources/css/bootstrap.css" th:href="@{/resources/css/bootstrap.css}" />
	<link rel="stylesheet" href="../../resources/css/style.css" th:href="@{/resources/css/style.css}" />
	<link rel="stylesheet" href="../../../resources/css/select2.css" th:href="@{/resources/css/select2.css}" />
	<link rel="stylesheet" href="../../../resources/css/jquery-ui.css" th:href="@{/resources/css/jquery-ui.css}" />
	
	<!-- JAVASCRIPT -->
	<script type="text/javascript" src="../../../resources/js/jquery.js" th:src="@{/resources/js/jquery.js}" />
	<script type="text/javascript" src="../../../resources/js/jquery-ui.js" th:src="@{/resources/js/jquery-ui.js}" />
	<script type="text/javascript" src="../../../resources/js/validator.js" th:src="@{/resources/js/validator.js}" />
	<script type="text/javascript" src="../../../resources/js/alerts.js" th:src="@{/resources/js/alerts.js}" />
	<script type="text/javascript" src="../../../resources/js/bootstrap.js" th:src="@{/resources/js/bootstrap.js}" />
	<script type="text/javascript" src="../../../resources/js/select2.js" th:src="@{/resources/js/select2.js}"></script>
	<script type="text/javascript" src="../../../resources/js/dynamic_cascades.js" th:src="@{/resources/js/dynamic_cascades.js}" />

	<title th:text="#{app.title}">Dziennik WWW</title>
</head>

<body>
	<div th:fragment="menu">
		<div class="navbar navbar-default">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#">Dziennik WWW</a>
			</div>
			<div class="navbar-collapse collapse">
				<ul class="nav navbar-nav">
					<li sec:authorize="hasAnyRole('Wykładowca')"><a href="#" th:href="@{/grades}" th:text="#{menu.grades}">Grades</a></li>
					<li sec:authorize="hasAnyRole('Wykładowca')"><a href="#" th:href="@{/creditingform}" th:text="#{menu.creditingform}">Grades</a></li>
					<li sec:authorize="hasAnyRole('Student')"><a href="#" th:href="@{/grades/mygrades}" th:text="#{menu.grades}">Grades</a></li>
					<li sec:authorize="hasAnyRole('Administrator', 'Wykładowca','Student')"><a href="#" th:href="@{/users/teachers}" th:text="#{menu.teachers}">Teachers</a></li>
					<li sec:authorize="hasAnyRole('Administrator', 'Wykładowca')"><a href="#" th:href="@{/users/students}" th:text="#{menu.students}">Students</a></li>
					<li sec:authorize="hasAnyRole('Administrator', 'Wykładowca')"><a href="#" th:href="@{/subjects}" th:text="#{menu.subjects}">Subjects</a></li>
					<li sec:authorize="hasAnyRole('Student')"><a href="#" th:href="@{/subjects/mysubjects}" th:text="#{menu.subjects}">Subjects</a></li>
					<li sec:authorize="hasAnyRole('Administrator')"><a href="#" th:href="@{/groups}" th:text="#{menu.groups}">Groups</a></li>					
				</ul>
				
				<ul class="nav navbar-nav navbar-right">					
		           <li>
						<i class="glyphicon glyphicon-user" style="float: left;margin-top: 16px;"/>
						<a href="#" th:href="@{/users/profile}" th:text="#{menu.profile}">Profil</a>
					</li>
					<li class="divider"/>
					<li>
						<i class="glyphicon glyphicon-off" style="float: left;margin-top: 16px;"/>
						<a href="#" th:href="@{/logout}" th:text="#{menu.logout}">Wyloguj</a>
					</li>
		        </ul>
			</div>
		</div>	
	</div>
</body>
</html>